const state = {
  photo: 'http://thirdqq.qlogo.cn/qqapp/1104455702/4AFC34E4A90E0BB5B52FE0E374B6E249/100',
  enaiText: '恩爱的文字',
  nickname: ''
}

const mutations = {
  SET_PHOTO: (state, data) => {
    state.photo = data
  },
  SET_ENAITEXT: (state, data) => {
    state.enaiText = data
  },
  SET_NICKNAME: (state, data) => {
    state.nickname = data
  }
}

const actions = {
  // user login
  login({ commit }, userInfo) {
    // const
  },
  uploadImg({ commit }, data) {
    commit('SET_PHOTO', data)
  },
  text({ commit }, data) {
    commit('SET_ENAITEXT', data)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
